#include <iostream>
using namespace std;

class Date
{
public:
    Date(int year = 1, int month = 1, int day = 1)
    {
        _year = year;
        _month = month;
        _day = day;
    }

	int GetMonthDay(int year, int month)
	{
		int arr[13] = { -1,31,28,31,30,31,30,31,31,30,31,30,31 };

		if (month == 2 && ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0))
		{
			return 29;
		}

		return arr[month];
	}

	void Print()
	{
		cout << _year << '-' << _month << '-' << _day << endl;
	}

	Date operator+(int day)
	{
		Date tmp = *this;

		tmp._day += day;
		while (tmp._day > GetMonthDay(_year, _month))
		{
			tmp._day -= GetMonthDay(tmp._year, tmp._month);

			tmp._month++;

			if (tmp._month == 13)
			{
				tmp._year++;
				tmp._month = 1;
			}
		}
		return tmp;
	}

private:
    int _year;
    int _month;
    int _day;
};

int main() 
{
    /*int a, b, c, day;
    cin >> a >> b >> c >> day;

    Date d1(a, b, c);
	Date d2 = d1 + day;*/

	Date d1;
	d1 = { 2, 1, 3 };
	d1.Print();

	return 0;
}